﻿namespace DailyPoetryH.Library.Models;

public class QueryFilter {
    public QueryFilterType Type { get; set; } = QueryFilterType.NameFilter;

    public string QueryFilterTypePropertyName {
        get => Type.PropertyName;
        set =>
            Type = QueryFilterType.FilterTypes.FirstOrDefault(p =>
                p.PropertyName == value) ?? QueryFilterType.NameFilter;
    }

    public string Content { get; set; } = string.Empty;
}